import { Column, Entity, PrimaryGeneratedColumn, CreateDateColumn, UpdateDateColumn } from 'typeorm';
import { BaseEntity } from 'src/common/entities/base';
import { ApiProperty } from '@nestjs/swagger';

@Entity('edu_school', {
  comment: '学校表',
})
export class SchoolEntity extends BaseEntity {
  @PrimaryGeneratedColumn({ type: 'int', name: 'school_id', comment: '学校ID' })
  public schoolId: number;

  @ApiProperty({ description: '学校名称' })
  @Column({ type: 'varchar', name: 'school_name', length: 64, comment: '学校名称' })
  public schoolName: string;

  @ApiProperty({ description: '学校编码' })
  @Column({ type: 'varchar', name: 'school_code', length: 64, comment: '学校编码' })
  public schoolCode: string;

  @ApiProperty({ description: '学校Logo' })
  @Column({ type: 'varchar', name: 'logo', length: 255, comment: '学校Logo', default: '' })
  public logo: string;

  @ApiProperty({ description: '联系人' })
  @Column({ type: 'varchar', name: 'contact_name', length: 64, comment: '联系人' })
  public contactName: string;

  @ApiProperty({ description: '联系电话' })
  @Column({ type: 'varchar', name: 'contact_phone', length: 64, comment: '联系电话' })
  public contactPhone: string;
}
